package com.ladlee.validata.processor;

import com.ladlee.validata.ValidataCodeType;
import com.ladlee.validata.ValidateCode;
import org.springframework.web.context.request.ServletWebRequest;

/**
 * @Auther: dingchang
 * @Date: 2018/12/21 15:58
 * @Description:
 */
public interface ValidateCodeRepository {

    /**
     * 保存验证码
     * @param request
     * @param code
     * @param validataCodeType
     */
    void save(ServletWebRequest request, ValidateCode code, ValidataCodeType validataCodeType);
    /**
     * 获取验证码
     * @param request
     * @param validataCodeType
     * @return
     */
    ValidateCode get(ServletWebRequest request, ValidataCodeType validataCodeType);
    /**
     * 移除验证码
     * @param request
     * @param codaType
     */
    void remove(ServletWebRequest request, ValidataCodeType codaType);
}
